package com.kakaluote.lzhimageserver.controller;

import com.kakaluote.lzhcommon.entity.Result;
import com.kakaluote.lzhcommon.entity.ResultCode;
import com.kakaluote.lzhserverapi.img.ImgControllerApi;
import com.netflix.hystrix.contrib.javanica.annotation.HystrixCommand;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;
import java.util.Random;

/**
 * @Description
 * @auther 刘中华
 * @create 2019-02-19 15:50
 */
@RestController
@RequestMapping("user/img")
public class UserImgController implements ImgControllerApi {
    @Override
    @RequestMapping("{id}")
    public Result getUserImg(@PathVariable("id") String id) {
//        System.out.println(1/0);
        try {
            Thread.sleep(2000);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
        return new Result(ResultCode.SUCCESS,"获取头像成功");
    }
}
